Derived classes of abstract class share property

65

Derived classes of abstract class share property -

abstract class A
{
    public abstract string X
    {
        get;
    }
}

class A1 : A
{
    public override string X
    {
        get { return "A1"; }
    }
}

class A2 : A
{
    public override string X
    {
        get { return "A2"; }
    }
}

Comments

Submit
0 Comments